
<form name="editForm" role="form" novalidate ng-submit="save()" show-validation>

    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true"
                ng-click="clear()">&times;</button>
        <h4 class="modal-title" id="mySessionLabel" translate="swanApp.session.home.createOrEditLabel">Create or edit a Session</h4>
    </div>
    <div class="modal-body">
        <div class="form-group">
            <label translate="global.field.id">ID</label>
            <input type="text" class="form-control" name="id"
                    ng-model="session.id" readonly>
        </div>

        <div class="form-group">
            <label translate="swanApp.session.name" for="field_name">Name</label>
            <input type="text" class="form-control" name="name" id="field_name"
                    ng-model="session.name" required>

            <div ng-show="editForm.name.$invalid">
                <p class="help-block"
                    ng-show="editForm.name.$error.required" translate="entity.validation.required">
                    This field is required.
                </p>
            </div>
        </div>
        <div class="form-group">
            <label translate="swanApp.session.timeSlotStart" for="field_timeSlotStart">TimeSlotStart</label>
            <input type="datetime-local" class="form-control" name="timeSlotStart" id="field_timeSlotStart"
                    ng-model="session.timeSlotStart" ng-model-options="{timezone: 'UTC +8:00'}" required>

            <div ng-show="editForm.timeSlotStart.$invalid">
                <p class="help-block"
                    ng-show="editForm.timeSlotStart.$error.required" translate="entity.validation.required">
                    This field is required.
                </p>
                <p class="help-block"
                    ng-show="editForm.timeSlotStart.$error.datetimelocal" translate="entity.validation.datetimelocal">
                    This field should be a date and time.
                </p>
            </div>
        </div>
        <div class="form-group">
            <label translate="swanApp.session.timeSlotEnd" for="field_timeSlotEnd">TimeSlotEnd</label>
            <input type="datetime-local" class="form-control" name="timeSlotEnd" id="field_timeSlotEnd"
                    ng-model="session.timeSlotEnd" ng-model-options="{timezone: 'UTC +8:00'}" required>

            <div ng-show="editForm.timeSlotEnd.$invalid">
                <p class="help-block"
                    ng-show="editForm.timeSlotEnd.$error.required" translate="entity.validation.required">
                    This field is required.
                </p>
                <p class="help-block"
                    ng-show="editForm.timeSlotEnd.$error.datetimelocal" translate="entity.validation.datetimelocal">
                    This field should be a date and time.
                </p>
            </div>
        </div>
        <div class="form-group">
            <label translate="swanApp.session.type" for="field_type">Type</label>
            <input type="number" class="form-control" name="type" id="field_type"
                    ng-model="session.type">

        </div>
        <div class="form-group">
            <label translate="swanApp.session.prerequisite" for="field_prerequisite">Prerequisite</label>
            <input type="text" class="form-control" name="prerequisite" id="field_prerequisite"
                    ng-model="session.prerequisite">

        </div>
        <div class="form-group">
            <label translate="swanApp.session.agenda" for="field_agenda">Agenda</label>
            <input type="text" class="form-control" name="agenda" id="field_agenda"
                    ng-model="session.agenda">

        </div>
        <div class="form-group">
            <label translate="swanApp.session.prepareList" for="field_prepareList">PrepareList</label>
            <input type="text" class="form-control" name="prepareList" id="field_prepareList"
                    ng-model="session.prepareList">

        </div>

        <div class="form-group">
            <label translate="swanApp.session.space" for="field_space">space</label>
            <select class="form-control" id="field_space" name="space" ng-model="session.space.id" ng-options="space.id as space.id for space in spaces">
            </select>
        </div>
        <div class="form-group">
            <label translate="swanApp.session.realParticipant" for="field_realParticipant">realParticipant</label>
            <select class="form-control" id="field_realParticipant" multiple name="realParticipant" ng-model="session.realParticipants" ng-options="member as member.id for member in members track by member.id">
            </select>
        </div>
        <div class="form-group">
            <label translate="swanApp.session.event" for="field_event">event</label>
            <select class="form-control" id="field_event" name="event" ng-model="session.event.id" ng-options="event.id as event.id for event in events">
            </select>
        </div>
    </div>
    <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal" ng-click="clear()">
            <span class="glyphicon glyphicon-ban-circle"></span>&nbsp;<span translate="entity.action.cancel">Cancel</span>
        </button>
        <button type="submit" ng-disabled="editForm.$invalid" class="btn btn-primary">
            <span class="glyphicon glyphicon-save"></span>&nbsp;<span translate="entity.action.save">Save</span>
        </button>
    </div>
</form>
